<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if ( ! function_exists('style_url'))
{
	function style_url($uri = '')
	{
		$CI =& get_instance();
		return $CI->config->base_url('assets/css/'.$uri.'.css');
	}
}

if ( ! function_exists('script_url'))
{
	function script_url($uri = '')
	{
		$CI =& get_instance();
		return $CI->config->base_url('assets/js/'.$uri.'.js');
	}
}

if ( ! function_exists('image_url'))
{
	function image_url($image_name = '')
	{
		$CI =& get_instance();
		return $CI->config->base_url('assets/img/'.$image_name);
	}
}

if ( ! function_exists('enrollment_link'))
{
	function enrollment_link()
	{
		$CI =& get_instance();
		return $CI->config->item('enrollment_url');
	}
}

if ( ! function_exists('school_logo'))
{
	function school_logo()
	{
		$CI =& get_instance();
		$path = FCPATH.'assets/uploads/school/school_logo.png';
		
		if(file_exists($path))
		{
			return $CI->config->base_url('assets/uploads/school/school_logo.png');;
		}else{
			return $CI->config->base_url('assets/img/school_logo.png');
		}
	}
}

if ( ! function_exists('student_link'))
{
	function student_link()
	{
		$CI =& get_instance();
		return $CI->config->item('student_url');
	}
}